--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit e74cae647126b4eb33bd7f2e38c97e1aca2fa11a
Parents : 4e48011
Author : Ivan <ivan@quad4.io>
Signature : Invalid signer <e46112d44649266d71fe2193e00a4710>, author is <ivan@quad4.io>
Date : 2026-07-07T11:32:21-05:00
refactor(tests): improve code formatting for better readability in test configuration and plugin setup
Changes
3 files changed, 19 insertions(+), 5 deletions(-)
Diff
diff --git a/tests/backend/conftest.py b/tests/backend/conftest.py
index adad0e4c..4f2b38eb 100644
--- a/tests/backend/conftest.py
+++ b/tests/backend/conftest.py
@@ -39,7 +39,9 @@ def pytest_configure(config):
worker = os.environ.get("PYTEST_XDIST_WORKER")
if worker:
os.makedirs(TEST_COVERAGE_DIR, exist_ok=True)
- os.environ["COVERAGE_FILE"] = os.path.join(str(TEST_COVERAGE_DIR), f".coverage.{worker}")
+ os.environ["COVERAGE_FILE"] = os.path.join(
+ str(TEST_COVERAGE_DIR), f".coverage.{worker}"
+ )
@pytest.fixture(scope="session")
diff --git a/tests/backend/support/test_temp_dir.py b/tests/backend/support/test_temp_dir.py
index 108f3b5b..025a40c7 100644
--- a/tests/backend/support/test_temp_dir.py
+++ b/tests/backend/support/test_temp_dir.py
@@ -34,7 +34,13 @@ def reset_test_temp_root() -> None:
def ensure_test_temp_dirs() -> Path:
- for path in (TEST_TEMP_ROOT, TEST_WORK_DIR, TEST_LOG_DIR, TEST_COVERAGE_DIR, PYTEST_BASE_TEMP):
+ for path in (
+ TEST_TEMP_ROOT,
+ TEST_WORK_DIR,
+ TEST_LOG_DIR,
+ TEST_COVERAGE_DIR,
+ PYTEST_BASE_TEMP,
+ ):
path.mkdir(parents=True, exist_ok=True)
work_dir = str(TEST_WORK_DIR)
diff --git a/tests/backend/test_plugin_security.py b/tests/backend/test_plugin_security.py
index 5a42cebb..ecd00056 100644
--- a/tests/backend/test_plugin_security.py
+++ b/tests/backend/test_plugin_security.py
@@ -35,10 +35,16 @@ def _write_plugin_dir(root, plugin_id="com.example.secure-plugin"):
with open(os.path.join(root, "plugin.json"), "w", encoding="utf-8") as handle:
json.dump(manifest, handle)
os.makedirs(os.path.join(root, "frontend"), exist_ok=True)
- with open(os.path.join(root, "frontend", "main.js"), "w", encoding="utf-8") as handle:
- handle.write("export async function activate(api) { api.setUi({ type: 'text', value: 'ok' }); }")
+ with open(
+ os.path.join(root, "frontend", "main.js"), "w", encoding="utf-8"
+ ) as handle:
+ handle.write(
+ "export async function activate(api) { api.setUi({ type: 'text', value: 'ok' }); }"
+ )
os.makedirs(os.path.join(root, "locales"), exist_ok=True)
- with open(os.path.join(root, "locales", "en.json"), "w", encoding="utf-8") as handle:
+ with open(
+ os.path.join(root, "locales", "en.json"), "w", encoding="utf-8"
+ ) as handle:
json.dump({"title": "Secure Plugin"}, handle)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────